<template>
  <view class="policy-box">
    <view class="policy-item" v-for="item in listData" :key="item.id" @click="onClick(item)">
      <view class="policy-title">
        {{ item.title }}
      </view>
      <view class="policy-subtitle">
        <text>
          {{ item.organization }} </text
        >&nbsp;&nbsp;&nbsp;&nbsp;
        <text> 发布于&nbsp;&nbsp;{{ item.time }} </text>
      </view>
    </view>
  </view>
</template>

<script setup>
import { ref, defineProps, defineEmits } from "vue";
const emit = defineEmits(["on-click"]);
const props = defineProps({
  listData: Array,
});
function onClick(item) {
  emit("on-click",item)
}
</script>

<style lang="less" scoped>
.policy-box {
  width: 100%;
  height: auto;
  .policy-item {
    border-bottom: 0.5rpx solid #dadada;
    padding-bottom: 30rpx;
    margin-top: 20rpx;
    .policy-title {
      font-size: 31rpx;
      font-weight: 400;
      font-family: "ali";
      color: #272636;
      margin-bottom: 10rpx;
    }
    .policy-subtitle {
      font-size: 23rpx;
      color: #9b9b9b;
      font-weight: 200;
      font-family: "ali";
      transform: scale(0.9) translate(-5%, 0);
    }
  }
}
</style>